import Vue from "vue";
import VueRouter from "vue-router";

Vue.use(VueRouter);

const routes = [
  
    {  //首页路由
        path: '/',
        component: () => import('@/views/layout'),
        children: [{
            //默认主页
            path: '',
            name: 'home',
            component:()=> import('@/views/home')
        }
         , 
       {    //订单
            path: 'OrderRecord',
            name: 'OrderRecord',
            component:()=>import('@/views/OrderRecord')
        },
        {   //我的
            path: 'my',
            name: 'my',
            component:()=>import('@/views/my'),
        },
        {   //平台
            path: 'platform',
            name: 'platform',
            component:()=>import('@/views/platform')
        },
        {   // 活动页面
            path: 'activity',
            name: 'activity',
            component:()=>import('@/views/activity')
        },
        ]
    },
    {   // 个人资料页面
        path:'/userinfo',
        name: 'userinfo',
        component:()=>import('@/views/UserInfo')
    },
    { // 账户安全中心
        path: '/AccountSecurity',
        name: 'AccountSecurity',
        component:()=> import('@/views/my/components/AccountSecurity.vue')
        
    },
    { //账变记录
        path:'/AccountChangeRecord',
        name:'AccountChangeRecord',
        component:() => import('@/views/my/components/AccountChangeRecord')
    },
    {   //消息中心
        path: '/messagecenter',
        name: 'messagecenter',
        component:()=>import('@/views/my/components/messagecenter')
    },
    {   //在线客服
        path: '/service',
        name: 'service',
        component:()=>import('@/views/my/components/service')
    },
    {   //充值
        path: '/recharge',
        name: 'recharge',
        component:()=>import('@/views/my/components/recharge')
    },
    {   //提现
        path: '/withdraw',
        name: 'withdraw',
        component:()=>import('@/views/my/components/withdraw')
    },
  
    {   //登录页面
        path: '/login',
        name: 'login',
        component:() => import('@/views/login')
    },
    {   //修改密码
        path: '/confirmPsd',
        component:() => import('@/views/login/components/confirmPsd')
    },
  
    
    // 我的资料内 修改密码
    {
        path: '/change-password',
        name: 'change-password',
        component:() => import('@/views/my/components/change-password')
    },
    
   
    // 忘记密码 输入用户名和验证码
    {
        path:'/seekPassword',
        name:'seekPassword',
        component:()=> import('@/views/login/components/seekPassword')
    },
    // 重置密码
    {
        path: '/confirmPsd',
        name: 'confirmPsd',
        component: () => import('@/views/login/components/confirmPsd')
    },
    {
        // 账户安全中心 绑定银行卡
        path: '/bankingCard',
        name: 'bankingCard',
        component:() => import('@/views/my/components/bankingCard')
    },

    {     
    //   注册页面
    path: "/register",
    name: "register",
    component: () => import("@/views/register"),
  },


//   账户安全中心 密码管理
  {
    path: "/moneypassword",
    name: "moneypassword",
    component: () => import("@/views/my/components/Money-password"),
  },
  //个人报表点击刷新
  {
    path: "/update",
    name: "update",
    component: () => import("@/views/my/components/update"),
    },
  //账单
  {
    path: "/PersonalReport",
    name: "updPersonalReportate",
    component: () => import("@/views/my/components/PersonalReport"),
  },
  //订单结算
  {
    path: "/Settlement",
    name: "Settlement",
    component: () => import("@/views/home/components/Settlement"),
    },
    {
        // 我的  个人报表
        path: '/PersonalReport',
        name: 'PersonalReport',
        component:() => import('@/views/my/components/PersonalReport')
  }
  
];

const router = new VueRouter({
  routes,
});
export default router;
